{extend name="mainadmin@layouts/base" /}
{block name="head" }

{/block}
{block name="main" }
<header class="header  b-b clearfix">
     <div class="page-breadcrumbs">
            <ul class="breadcrumb" >
                <li>
                    <i class="fa fa-ellipsis-v"></i>
                    <strong>其它设置</strong>
                </li>                                  
            </ul>
      </div>
</header>
<form class="form-horizontal form-validate form_vbox" id="_form" method="post" action="{:url('save')}">
    <section class="vbox">
        <section class="scrollable  wrapper w-f">
            <section class="panel panel-default">
                <header>
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#basic" data-toggle="tab">基本配置</a></li>

                      {if condition="$setting.sys_model_shop_bonus == 1"}
                            <li><a href="#bonus" data-toggle="tab">优惠券设置</a></li>
                        {/if} 
                        <li><a href="#goodSet" data-toggle="tab">商品详细页设置</a></li>
                        <li class="hide"><a href="#show_ordermessage" data-toggle="tab">首页订单信息轮播配置</a></li>
                    </ul>
                </header>
                <div class="tab-content">
                    <div class="tab-pane active" id="basic">



                        <div class="form-group">
                            <label class="col-sm-2 control-label">商城名称：</label>
                            <div class="controls">
                                <input type="text" name="shop_title" class="input-large" value="{$setting.shop_title}">
                                <span class="help-line">首页 - xxxxxxxxxx</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">搜索框文字：</label>
                            <div class="controls">
                                <input type="text" name="shop_index_search_text" class="input-large"
                                       data-rule-required="true" value="{$setting.shop_index_search_text}"> <span
                                    class="help-line">搜索框默认显示的搜索关键字</span>
                            </div>
                        </div>
                        <div class="form-group hide">
                            <label class="col-sm-2 control-label">热门搜索：</label>
                            <div class="controls">
                                <input type="text" name="hot_search" class="input-xxlarge"
                                       value="{$setting.hot_search}"> <span class="help-line">每个搜索词中间用空格隔开</span>
                            </div>
                        </div>

                        <div class="form-group hide">
                            <label class="col-sm-2 control-label">首页头条数量：</label>
                            <div class="controls">
                                <select name="headline_max_num">
                                    {for start="1" end="31" name="num" }
                                    <option value="{$num}" {$setting[
                                    'headline_max_num']==$num?'selected':''}>{$num} 条</option>
                                    {/for}
                                </select> <span class="help-line">首页头条最多可显示的数量</span>
                            </div>
                        </div>
                    </div>


                    <!--商品设置-->
                    <div class="tab-pane" id="goodSet">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">开放商品评论：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_comment" value="0" {$setting['shop_goods_comment']<1?'checked':''}
                                    type="radio">关闭
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_comment" value="1" {$setting['shop_goods_comment']==1?'checked':''}
                                    type="radio" >开启
                                </label>
                            </div>
                        </div>
                        <div class="form-group hide">
                            <label class="col-sm-2 control-label">开放商品问答：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_answer" value="0" {$setting['shop_goods_answer']<1?'checked':''}
                                    type="radio">关闭
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_answer" value="1" {$setting['shop_goods_answer']==1?'checked':''}
                                    type="radio" >开启
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">显示商品市场原价：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_show_market_price" value="0" {$setting['shop_goods_show_market_price']<1?'checked':''}
                                    type="radio">隐藏
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_show_market_price" value="1" {$setting['shop_goods_show_market_price']==1?'checked':''}
                                    type="radio" >显示
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">显示商品销量：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_show_sale_num" value="0" {$setting['shop_goods_show_sale_num']<1?'checked':''}
                                    type="radio">隐藏
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_show_sale_num" value="1" {$setting['shop_goods_show_sale_num']==1?'checked':''}
                                    type="radio" >显示
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">显示商品收藏量：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_show_collect_num" value="0" {$setting['shop_goods_show_collect_num']<1?'checked':''}
                                    type="radio">隐藏
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_show_collect_num" value="1" {$setting['shop_goods_show_collect_num']==1?'checked':''}
                                    type="radio" >显示
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">显示商品库存：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="shop_goods_show_stock_num" value="0" {$setting['shop_goods_show_stock_num']<1?'checked':''}
                                    type="radio">隐藏
                                </label>
                                <label class="radio-inline">
                                    <input name="shop_goods_show_stock_num" value="1" {$setting['shop_goods_show_stock_num']==1?'checked':''}
                                    type="radio" >显示
                                </label>
                            </div>
                        </div>
                    </div>

                    <div class="tab-pane " id="show_ordermessage">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">开启订单轮播：</label>
                            <div class="controls">
                                <label class="radio-inline">
                                    <input name="show_ordermessage_switch" value="0" {$setting['show_ordermessage_switch']<1?'checked':''}
                                    type="radio">关闭
                                </label>
                                <label class="radio-inline">
                                    <input name="show_ordermessage_switch" value="1" {$setting['show_ordermessage_switch']==1?'checked':''}
                                    type="radio" >开启
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">显示频率/s：</label>
                            <div class="controls">
                                <input type="text" name="show_ordermessage_frequency"
                                       value="{$setting.show_ordermessage_frequency}"> <span class="help-line"></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">获取真订单频率/s:</label>
                            <div class="controls">
                                <input type="text" name="show_ordermessage_rfrequency"
                                       value="{$setting.show_ordermessage_rfrequency}"> <span class="help-line"></span>
                            </div>
                            <span class="help-line">秒,真订单获取频率</span>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">假订单命中率:</label>
                            <div class="controls">
                                <input type="text" name="show_ordermessage_hit"
                                       value="{$setting.show_ordermessage_hit}"> <span class="help-line"></span>
                            </div>
                            <span class="help-line">%,每次频率刷新显示的命中率(0~100)</span>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">订单提示语:</label>
                            <div class="controls">
                                <input type="text" name="show_ordermessage_content"
                                       value="{$setting.show_ordermessage_content}"> <span class="help-line"></span>
                            </div>
                            <span class="help-line">xxx 刚刚下了一条订单</span>
                        </div>
                        <div class="form-group">
                            注意：<br/>显示频率必须要比获取真实频率要小<br/>显示频率不能低于3秒,小于3秒会自动的转换成3秒<br/>显示频率越长，对系统越为友好
                        </div>
                         <div class="form-group">
                            <label class="col-sm-2 control-label">注册优惠券背景：</label>
                            <div class="controls col-sm-6">
                                <span class="help-inline">建议图片尺寸：320*320像素</span><br>
                                <img class="thumb_img" src="{$setting.reg_bonus_bg}" style="max-height: 100px;"/><br>
                                <input class="hide" type="text" name="reg_bonus_bg" value="{$setting.reg_bonus_bg}"/>
                                <button class="btn btn-default" type="button" data-toggle="selectimg">选择图片</button>
                            </div>
                        </div> 
                    </div>
                </div>
            </section>
        </section>
        <footer class="footer bg-white b-t p-t">
            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-1">
                    <button type="submit" class="btn btn-primary js_save_submit" data-loading-text="保存中...">保存
                    </button>
                    <button type="button" class="btn btn-default" data-toggle="back">取消</button>
                </div>
            </div>
        </footer>
    </section>
</form>
{/block}
{block name="footer" }
<script type="text/javascript">



</script>
{/block}